Platform Explorer / Nuxeo Platform LTS 2017 9.10

Contribution org.nuxeo.ecm.platform.audit.PageProviderservice.es.contrib--providers

This contribution is part of XML component org.nuxeo.ecm.platform.audit.PageProviderservice.es.contrib inside nuxeo-elasticsearch-audit-9.10.jar /OSGI-INF/es-audit-pageprovider-contrib.xml

Extension Point

Extension point providers of component PageProviderService.

Contributed Items

  • <genericPageProvider class="org.nuxeo.elasticsearch.audit.pageprovider.ESAuditPageProvider" name="EVENTS_VIEW">
          <property name="coreSession">#{documentManager}</property>
          <property name="generateUIComments">false</property>
          <whereClause docType="BasicAuditSearch">
            <predicate operator="BETWEEN" parameter="eventDate">
              <field name="startDate" schema="basicauditsearch"/>
              <field name="endDate" schema="basicauditsearch"/>
            </predicate>
            <predicate operator="=" parameter="category">
              <field name="eventCategory" schema="basicauditsearch"/>
            </predicate>
            <predicate operator="IN" parameter="eventId">
              <field name="eventIds" schema="basicauditsearch"/>
            </predicate>
            <predicate operator="=" parameter="principalName">
              <field name="principalName" schema="basicauditsearch"/>
            </predicate>
          </whereClause>
          <sort ascending="false" column="eventDate"/>
          <pageSize>10</pageSize>
          <maxPageSize>1000</maxPageSize>
        </genericPageProvider>
  • <genericPageProvider class="org.nuxeo.elasticsearch.audit.pageprovider.ESAuditPageProvider" name="DOCUMENT_HISTORY_PROVIDER_OLD">
          <whereClause docType="BasicAuditSearch">
            <fixedPart>
                {
    		        "bool" : {
    		          "must" : {
    		            "match" : {
    		              "docUUID" : {
    		                "query" : "?"
    		              }
    		            }
    		          }
    		        }
    			  }
            </fixedPart>
            <predicate operator="BETWEEN" parameter="eventDate">
              <field name="startDate" schema="basicauditsearch"/>
              <field name="endDate" schema="basicauditsearch"/>
            </predicate>
            <predicate operator="IN" parameter="category">
              <field name="eventCategories" schema="basicauditsearch"/>
            </predicate>
            <predicate operator="IN" parameter="eventId">
              <field name="eventIds" schema="basicauditsearch"/>
            </predicate>
            <predicate operator="IN" parameter="principalName">
              <field name="principalNames" schema="basicauditsearch"/>
            </predicate>
          </whereClause>
          <sort ascending="true" column="id"/>
          <pageSize>5</pageSize>
        </genericPageProvider>
  • <genericPageProvider class="org.nuxeo.elasticsearch.audit.pageprovider.ESDocumentHistoryPageProvider" name="DOCUMENT_HISTORY_PROVIDER">
          <whereClause docType="BasicAuditSearch">
            <predicate operator="BETWEEN" parameter="eventDate">
              <field name="startDate" schema="basicauditsearch"/>
              <field name="endDate" schema="basicauditsearch"/>
            </predicate>
            <predicate operator="IN" parameter="category">
              <field name="eventCategories" schema="basicauditsearch"/>
            </predicate>
            <predicate operator="IN" parameter="eventId">
              <field name="eventIds" schema="basicauditsearch"/>
            </predicate>
            <predicate operator="IN" parameter="principalName">
              <field name="principalNames" schema="basicauditsearch"/>
            </predicate>
          </whereClause>
          <sort ascending="false" column="eventDate"/>
            <pageSize>10</pageSize>
            <maxPageSize>1000</maxPageSize>
        </genericPageProvider>
  • <genericPageProvider class="org.nuxeo.elasticsearch.audit.pageprovider.ESAuditPageProvider" name="ADMIN_HISTORY">
            <property name="coreSession"/>
            <property name="generateUIComments">false</property>
            <whereClause docType="BasicAuditSearch">
              <predicate operator="BETWEEN" parameter="eventDate">
                <field name="startDate" schema="basicauditsearch"/>
                <field name="endDate" schema="basicauditsearch"/>
              </predicate>
              <predicate operator="=" parameter="category">
                <field name="eventCategory" schema="basicauditsearch"/>
              </predicate>
              <predicate operator="IN" parameter="eventId">
                <field name="eventIds" schema="basicauditsearch"/>
              </predicate>
              <predicate operator="=" parameter="principalName">
                <field name="principalName" schema="basicauditsearch"/>
              </predicate>
            </whereClause>
            <sort ascending="false" column="eventDate"/>
            <pageSize>10</pageSize>
            <maxPageSize>1000</maxPageSize>
          </genericPageProvider>
  • <genericPageProvider class="org.nuxeo.elasticsearch.audit.pageprovider.ESDocumentHistoryPageProvider" name="LATEST_AUDITED_CREATED_USERS_OR_GROUPS_PROVIDER">
         <pattern>
    {
      "query": {
        "bool": {
          "must": [
            {
              "term": {
                "category": "userGroup"
              }
            },
            {
              "bool": {
                "should": [
                  {
                    "term": {
                      "eventId": "user_created"
                    }
                  },
                  {
                    "term": {
                      "eventId": "group_created"
                    }
                  }
                ]
              }
            }
          ]
        }
      }
    }
        </pattern>
        <sort ascending="false" column="eventDate"/>
        <pageSize>5</pageSize>
        <maxPageSize>100</maxPageSize>
      </genericPageProvider>

XML Source

<extension point="providers" target="org.nuxeo.ecm.platform.query.api.PageProviderService">

    <genericPageProvider class="org.nuxeo.elasticsearch.audit.pageprovider.ESAuditPageProvider" name="EVENTS_VIEW">
      <property name="coreSession">#{documentManager}</property>
      <property name="generateUIComments">false</property>
      <whereClause docType="BasicAuditSearch">
        <predicate operator="BETWEEN" parameter="eventDate">
          <field name="startDate" schema="basicauditsearch"/>
          <field name="endDate" schema="basicauditsearch"/>
        </predicate>
        <predicate operator="=" parameter="category">
          <field name="eventCategory" schema="basicauditsearch"/>
        </predicate>
        <predicate operator="IN" parameter="eventId">
          <field name="eventIds" schema="basicauditsearch"/>
        </predicate>
        <predicate operator="=" parameter="principalName">
          <field name="principalName" schema="basicauditsearch"/>
        </predicate>
      </whereClause>
      <sort ascending="false" column="eventDate"/>
      <pageSize>10</pageSize>
      <maxPageSize>1000</maxPageSize>
    </genericPageProvider>

    <genericPageProvider class="org.nuxeo.elasticsearch.audit.pageprovider.ESAuditPageProvider" name="DOCUMENT_HISTORY_PROVIDER_OLD">
      <whereClause docType="BasicAuditSearch">
        <fixedPart>
            {
		        "bool" : {
		          "must" : {
		            "match" : {
		              "docUUID" : {
		                "query" : "?"
		              }
		            }
		          }
		        }
			  }
        </fixedPart>
        <predicate operator="BETWEEN" parameter="eventDate">
          <field name="startDate" schema="basicauditsearch"/>
          <field name="endDate" schema="basicauditsearch"/>
        </predicate>
        <predicate operator="IN" parameter="category">
          <field name="eventCategories" schema="basicauditsearch"/>
        </predicate>
        <predicate operator="IN" parameter="eventId">
          <field name="eventIds" schema="basicauditsearch"/>
        </predicate>
        <predicate operator="IN" parameter="principalName">
          <field name="principalNames" schema="basicauditsearch"/>
        </predicate>
      </whereClause>
      <sort ascending="true" column="id"/>
      <pageSize>5</pageSize>
    </genericPageProvider>


    <genericPageProvider class="org.nuxeo.elasticsearch.audit.pageprovider.ESDocumentHistoryPageProvider" name="DOCUMENT_HISTORY_PROVIDER">
      <whereClause docType="BasicAuditSearch">
        <predicate operator="BETWEEN" parameter="eventDate">
          <field name="startDate" schema="basicauditsearch"/>
          <field name="endDate" schema="basicauditsearch"/>
        </predicate>
        <predicate operator="IN" parameter="category">
          <field name="eventCategories" schema="basicauditsearch"/>
        </predicate>
        <predicate operator="IN" parameter="eventId">
          <field name="eventIds" schema="basicauditsearch"/>
        </predicate>
        <predicate operator="IN" parameter="principalName">
          <field name="principalNames" schema="basicauditsearch"/>
        </predicate>
      </whereClause>
      <sort ascending="false" column="eventDate"/>
        <pageSize>10</pageSize>
        <maxPageSize>1000</maxPageSize>
    </genericPageProvider>

      <genericPageProvider class="org.nuxeo.elasticsearch.audit.pageprovider.ESAuditPageProvider" name="ADMIN_HISTORY">
        <property name="coreSession"/>
        <property name="generateUIComments">false</property>
        <whereClause docType="BasicAuditSearch">
          <predicate operator="BETWEEN" parameter="eventDate">
            <field name="startDate" schema="basicauditsearch"/>
            <field name="endDate" schema="basicauditsearch"/>
          </predicate>
          <predicate operator="=" parameter="category">
            <field name="eventCategory" schema="basicauditsearch"/>
          </predicate>
          <predicate operator="IN" parameter="eventId">
            <field name="eventIds" schema="basicauditsearch"/>
          </predicate>
          <predicate operator="=" parameter="principalName">
            <field name="principalName" schema="basicauditsearch"/>
          </predicate>
        </whereClause>
        <sort ascending="false" column="eventDate"/>
        <pageSize>10</pageSize>
        <maxPageSize>1000</maxPageSize>
      </genericPageProvider>

  <genericPageProvider class="org.nuxeo.elasticsearch.audit.pageprovider.ESDocumentHistoryPageProvider" name="LATEST_AUDITED_CREATED_USERS_OR_GROUPS_PROVIDER">
     <pattern>
{
  "query": {
    "bool": {
      "must": [
        {
          "term": {
            "category": "userGroup"
          }
        },
        {
          "bool": {
            "should": [
              {
                "term": {
                  "eventId": "user_created"
                }
              },
              {
                "term": {
                  "eventId": "group_created"
                }
              }
            ]
          }
        }
      ]
    }
  }
}
    </pattern>
    <sort ascending="false" column="eventDate"/>
    <pageSize>5</pageSize>
    <maxPageSize>100</maxPageSize>
  </genericPageProvider>

  </extension>